rpcd-mod-luci: support parsing 11ax HW / HT modes
authorDavid Bauer <[email protected]>
Sat, 5 Jun 2021 14:18:35 +0000 (16:18 +0200)
committerJo-Philipp Wich <[email protected]>
Tue, 12 Oct 2021 21:00:29 +0000 (23:00 +0200)
Add support for parsing 11ax modes returned from UBUS. This is required
so the frontend can display information about supported 11ax operation.

Signed-off-by: David Bauer <[email protected]>
(cherry picked from commit 7b11e848ac48325377712179fb9cf79fffff207d)

libs/rpcd-mod-luci/src/luci.c

index 27c80127b3a30bfe884d2ff93e171b594ea796f8..eb6f58803e86e9c5fd0e5ca0be2e06dbcf9205ca 100644 (file)
@@ -912,6 +912,9 @@ static bool rpc_luci_get_iwinfo(struct blob_buf *buf, const char *devname,
        if (!iw->hwmodelist(devname, &nret)) {
                a = blobmsg_open_array(buf, "hwmodes");
 
+               if (nret & IWINFO_80211_AX)
+                       blobmsg_add_string(buf, NULL, "ax");
+
                if (nret & IWINFO_80211_AC)
                        blobmsg_add_string(buf, NULL, "ac");
 
@@ -954,6 +957,18 @@ static bool rpc_luci_get_iwinfo(struct blob_buf *buf, const char *devname,
                if (nret & IWINFO_HTMODE_VHT160)
                        blobmsg_add_string(buf, NULL, "VHT160");
 
+               if (nret & IWINFO_HTMODE_HE20)
+                       blobmsg_add_string(buf, NULL, "HE20");
+
+               if (nret & IWINFO_HTMODE_HE40)
+                       blobmsg_add_string(buf, NULL, "HE40");
+
+               if (nret & IWINFO_HTMODE_HE80)
+                       blobmsg_add_string(buf, NULL, "HE80");
+
+               if (nret & IWINFO_HTMODE_HE160)
+                       blobmsg_add_string(buf, NULL, "HE160");
+
                blobmsg_close_array(buf, a);
        }